package com.bw.shopping.mvvm.model;

import com.bw.mvvm.entity.BaseEntity;
import com.bw.mvvm.mvvm.model.BaseModel;
import com.bw.mvvm.network.load.HttpEnum;
import com.bw.mvvm.network.load.HttpFactory;

import io.reactivex.Observable;
import okhttp3.RequestBody;

public class SeckillModel extends BaseModel {


    public Observable<BaseEntity> entity(){
        return changeFunc(HttpFactory.create(HttpEnum.Token).getRetrofit()
        .create(Api.class).requestSeckill());
    }

    public Observable<BaseEntity> entityObservable(RequestBody body){
        return changeFunc(HttpFactory.create(HttpEnum.Token).getRetrofit()
                .create(Api.class).requestSeckillMessager(body));
    }
}
